<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

define('USERNAME_REQUIRED', FALSE);
define('ACCOUNT_REQUIRED', FALSE);
define('MAINTENANCE_PAGE', TRUE);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zengo in onderhoud!</title>

		<link type="text/css" rel="stylesheet" href="inc/maintenance/main.css" />
        
</head>

<?php

include("inc/config.php");

ob_start(); 
session_start();
$conDb = mysql_connect($dbhost, $dbusername, $dbpassword);
mysql_select_db($dbname, $conDb) or die(mysql_error());

	$sql = mysql_query("SELECT * FROM onderhoud");
	$row = mysql_fetch_assoc($sql);
	?>

<body>

<div class="container">

	<a href="adminlogin.php"><div class="logo"></div></a>
	
	<div class="inside_bg">
	
		<h2>Zengo is in onderhoud!</h2>
	
		<div class="second_tekst">
			
<?php
        
        if($row['id'] == '0'){
				echo 'hoi';
        }else{
				echo $row['onderhoudstekst'];
				echo '<div style="width: 365px;"><h3 class="demoHeaders">Voor ';
				echo $row['voortgang']; 
				echo '% klaar!</h3> <div id="progressbar"></div></div>';
				}
?>

<head>
		<link type="text/css" href="onderhoudsysteem/css/ui-lightness/jquery-ui-1.8.14.custom.css" rel="stylesheet" />
        
		<script type="text/javascript" src="onderhoudsysteem/js/jquery-1.5.1.min.js"></script>
        
		<script type="text/javascript" src="onderhoudsysteem/js/jquery-ui-1.8.14.custom.min.js"></script>
        
		<script type="text/javascript">
			$(function(){// Progressbar
				$("#progressbar").progressbar({ value: <?php echo $row['voortgang']; ?> });
				
				//hover states on the static widgets
				$('#dialog_link, ul#icons li').hover(
					function() { $(this).addClass('ui-state-hover'); }, 
					function() { $(this).removeClass('ui-state-hover'); }
				);
				
			});
		</script>
        
		<style type="text/css">
			/*demo page css*/
			#dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
			#dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
			ul#icons {margin: 0; padding: 0;}
			ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
			ul#icons span.ui-icon {float: left; margin: 0 4px;}
		</style>	
</head>
			
		</div>
		
	</div>
	
	<div class="second_container">
    
    	<div class="contentBox">
	
			<div class="inside_s_container">
		
				<div class="s_header">
			
					<div class="s_header_tekst">
					
						Wat is er aan de hand?
					
					</div>
			
				</div>
            
        	</div>
            
            <div style="max-height:368px;overflow:scroll;overflow-y:scroll;overflow-x:hidden;text-align:left;height:368px;">
            <?php 
			$query = mysql_query("SELECT * FROM cms_news ORDER BY published DESC LIMIT 10");
			
			$color = 'odd';
			
			while($news = mysql_fetch_array($query))
			
			{
				
				echo '
            
            <div class="box '.$color.'">'.$news['title'].'</div>
			
			';
			if($color == 'odd')
			
			$color='even';
			
			else
			
			$color='odd';
			
			}
			?>
            </div>
			
		</div>
	
	</div>
	
</div>

</body>

</html>